<?php
namespace Superadmins\Controller;
class ImportController extends CommonController

{
	public function index()
	{
		// utf-8

		
		header("Content-type: text/html; charset=utf-8"); 
		//echo './Public';
		$file = fopen("./Public/school_info.csv","r");
		while(! feof($file))
  		{
 			$array[]=fgetcsv($file);
  		}
		fclose($file);
	
		array_shift($array);
		$school=M('school');
		$schoo_relation=M('schoo_relation');
		$school_type=M('school_type');
		foreach ($array as $v)
		{
			$data['school_name']=$v['1'];
			$data['alases']=$v['38'];
			$data['website']=$v['17'];
			$school->add($data);
			
		}
		
	}
		
}